﻿<Window x:Class="Yarr.YarrPad.DbgConsole"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:yarr="clr-namespace:Yarr.YarrPad"
    Title="Yarr Debugger" ToolTip="Yarr Debugger" Name="YarrDbg" 
    Width="480" Height="320" ResizeMode="NoResize" 
    WindowStartupLocation="CenterOwner" LocationChanged="YarrDbg_LocationChanged">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="25" />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        
        <ToolBar Grid.Row="0" Grid.ColumnSpan="2" x:Name="bugBar">
            <ToolBar.Items>
                <Button x:Name="stepIn" IsDefault="true" ToolTip="Step In" Width="60" Click="stepIn_Click">( -> (..) )</Button>
                <Button x:Name="stepOver" ToolTip="Step Over" Width="60" Click="stepOver_Click">(..) -> (..)</Button>
                <Button x:Name="stepOut" ToolTip="Step Out" Width="60" Click="stepOut_Click">( (..) -> )</Button>
                <Button x:Name="debugGo" ToolTip="Run to breakpoint" Width="40" Click="debugGo_Click">Run</Button>
                <Button x:Name="debugQuit" IsCancel="True" ToolTip="Run to completion" Width="60" Click="debugQuit_Click">Complete</Button>
                <Button x:Name="debugAbort" ToolTip="Cancel execution" Width="50" Click="debugAbort_Click">Cancel</Button>
                <Button x:Name="addBkpt" ToolTip="Add breakpoint" Width="80" Click="AddBkpt_Click">Add Bkpt ...</Button>
            </ToolBar.Items>
        </ToolBar>
        
        <TextBox Grid.Row="1" Grid.Column="0" x:Name="bugForm" IsReadOnly="True" ToolTip="Current Form" FontFamily="Courier New" />
        <ListBox Grid.Row="1" Grid.Column="1" x:Name="callStack" SelectionChanged="callStack_SelectionChanged" ToolTip="Call Stack" />
        
        <GridSplitter Grid.Row="1" Grid.Column="0" Width="5" VerticalAlignment="Stretch" />
        <GridSplitter Grid.Row="2" Grid.ColumnSpan="2" Height="5" HorizontalAlignment="Stretch" VerticalAlignment="Top" />
        <GridSplitter Grid.Row="2" Grid.Column="0" Width="5" VerticalAlignment="Stretch" />
        <yarr:ConsoleControl Grid.Row="2" Grid.Column="0"  x:Name="bugConsole" FontSize="12" ToolTip="Evaluation" />
        <ListBox Grid.Row="2" Grid.Column="1" x:Name="breakPoints" ToolTip="Breakpoints" MouseDoubleClick="breakPoints_MouseDoubleClick">
            <ListBox.ContextMenu>
                <ContextMenu x:Name="BkptCtxMenu">
                    <MenuItem x:Name="AddBkptMenu" Click="AddBkpt_Click" Header="Add Bkpt ..." />
                    <MenuItem x:Name="ToggleBkptMenu" Click="ToggleBkpt_Click" Header="Toggle Bkpt" />
                    <MenuItem x:Name="RemoveBkptMenu" Click="RemoveBkpt_Click" Header="Remove Bkpt" />
                </ContextMenu>
            </ListBox.ContextMenu>
        </ListBox>
    </Grid>
</Window>
